/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package cart.hibernate.member;

/**
 *
 * @author BibooChung
 */

import java.util.Date;
import java.util.Set;
import java.util.HashSet;
import cart.hibernate.membershipTier.*;
import cart.hibernate.order.*;


public class Member {
    private String loginName;
    private String password;
    private String email;
    private char gender;
    private String homePhoneNumber;
    private String cellPhoneNumber;
    private Date birthDate;
    private Date joinDate;
    private String nickName;
    private long point;
    private String firstName;
    private String middleName;
    private String lastName;

    private MembershipTier membershipTier;
    private Set<Order> orders;

    public Member(){        
    }

    public Member(String loginName, String password, String email, 
        char gender, String homePhoneNumber, String cellPhoneNumber, 
        Date birthDate, Date joinDate, String nickName, long point, 
        String firstName, String middleName, String lastName){
        this.loginName = loginName;
        this.password = password;
        this.email = email;
        this.gender = gender;
        this.homePhoneNumber = homePhoneNumber;
        this.cellPhoneNumber = cellPhoneNumber;
        this.birthDate = birthDate;
        this.joinDate = joinDate;
        this.nickName = nickName;
        this.point = point;
        this.firstName = firstName;
        this.middleName = middleName;
        this.lastName = lastName;
    }
    //using
    public Member(String loginName, String password, String email, 
        char gender, String homePhoneNumber, String cellPhoneNumber, 
        Date birthDate, String nickName, long point, 
        String firstName, String middleName, String lastName, MembershipTier membershipTier){
        this.loginName = loginName;
        this.password = password;
        this.email = email;
        this.gender = gender;
        this.homePhoneNumber = homePhoneNumber;
        this.cellPhoneNumber = cellPhoneNumber;
        this.birthDate = birthDate;
        this.nickName = nickName;
        this.point = point;
        this.firstName = firstName;
        this.middleName = middleName;
        this.lastName = lastName;
        this.membershipTier = membershipTier;
    }
    
    /**
     * @return the loginName
     */
    public String getLoginName() {
        return loginName;
    }

    /**
     * @param loginName the loginName to set
     */
    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    /**
     * @return the password
     */
    public String getPassword() {
        return password;
    }

    /**
     * @param password the password to set
     */
    public void setPassword(String password) {
        this.password = password;
    }


    /**
     * @return the email
     */
    public String getEmail() {
        return email;
    }

    /**
     * @param email the email to set
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * @return the gender
     */
    public char getGender() {
        return gender;
    }

    /**
     * @param gender the gender to set
     */
    public void setGender(char gender) {
        this.gender = gender;
    }

    /**
     * @return the homePhoneNumber
     */
    public String getHomePhoneNumber() {
        return homePhoneNumber;
    }

    /**
     * @param homePhoneNumber the homePhoneNumber to set
     */
    public void setHomePhoneNumber(String homePhoneNumber) {
        this.homePhoneNumber = homePhoneNumber;
    }

    /**
     * @return the cellPhoneNumber
     */
    public String getCellPhoneNumber() {
        return cellPhoneNumber;
    }

    /**
     * @param cellPhoneNumber the cellPhoneNumber to set
     */
    public void setCellPhoneNumber(String cellPhoneNumber) {
        this.cellPhoneNumber = cellPhoneNumber;
    }

    /**
     * @return the birthDate
     */
    public Date getBirthDate() {
        return birthDate;
    }

    /**
     * @param birthDate the birthDate to set
     */
    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }

    /**
     * @return the joinDate
     */
    public Date getJoinDate() {
        return joinDate;
    }

    /**
     * @param joinDate the joinDate to set
     */
    public void setJoinDate(Date joinDate) {
        this.joinDate = joinDate;
    }

    /**
     * @return the nickName
     */
    public String getNickName() {
        return nickName;
    }

    /**
     * @param nickName the nickName to set
     */
    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    /**
     * @return the point
     */
    public long getPoint() {
        return point;
    }

    /**
     * @param point the point to set
     */
    public void setPoint(long point) {
        this.point = point;
    }

    /**
     * @return the firstName
     */
    public String getFirstName() {
        return firstName;
    }

    /**
     * @param firstName the firstName to set
     */
    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    /**
     * @return the middleName
     */
    public String getMiddleName() {
        return middleName;
    }

    /**
     * @param middleName the middleName to set
     */
    public void setMiddleName(String middleName) {
        this.middleName = middleName;
    }

    /**
     * @return the lastName
     */
    public String getLastName() {
        return lastName;
    }

    /**
     * @param lastName the lastName to set
     */
    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    /**
     * @return the membershipTier
     */
    public MembershipTier getMembershipTier() {
        return membershipTier;
    }

    /**
     * @param membershipTier the membershipTier to set
     */
    public void setMembershipTier(MembershipTier membershipTier) {
        this.membershipTier = membershipTier;
    }

    public Set<Order> getOrders() {
        return orders;
    }

    public void setOrders(Set<Order> orders) {
        this.orders = orders;
    }

    public void setMember(String loginName, String password, String email, 
        char gender, String homePhoneNumber, String cellPhoneNumber, 
        Date birthDate, String nickName, long point, 
        String firstName, String middleName, String lastName, MembershipTier membershipTier){
        this.loginName = loginName;
        this.password = password;
        this.email = email;
        this.gender = gender;
        this.homePhoneNumber = homePhoneNumber;
        this.cellPhoneNumber = cellPhoneNumber;
        this.birthDate = birthDate;
        this.nickName = nickName;
        this.point = point;
        this.firstName = firstName;
        this.middleName = middleName;
        this.lastName = lastName;
        this.membershipTier = membershipTier;
    }

    public void setMember(String loginName, String password, String email, 
        char gender, String homePhoneNumber, String cellPhoneNumber, 
        Date birthDate, String nickName, long point, 
        String firstName, String middleName, String lastName, MembershipTier membershipTier,
        Set<Order> orders){
        this.loginName = loginName;
        this.password = password;
        this.email = email;
        this.gender = gender;
        this.homePhoneNumber = homePhoneNumber;
        this.cellPhoneNumber = cellPhoneNumber;
        this.birthDate = birthDate;
        this.nickName = nickName;
        this.point = point;
        this.firstName = firstName;
        this.middleName = middleName;
        this.lastName = lastName;
        this.membershipTier = membershipTier;
        this.orders = orders;    
    }

    public void setMember(Member member){
        this.loginName = member.loginName;
        this.password = member.password;
        this.email = member.email;
        this.gender = member.gender;
        this.homePhoneNumber = member.homePhoneNumber;
        this.cellPhoneNumber = member.cellPhoneNumber;
        this.birthDate = member.birthDate;
        this.nickName = member.nickName;
        this.point = member.point;
        this.firstName = member.firstName;
        this.middleName = member.middleName;
        this.lastName = member.lastName;
        this.membershipTier = member.membershipTier;
        this.orders = member.orders;    
    }
}
